<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>后台管理界面</title>
<link rel="stylesheet" type="text/css" href="../common/component/jquery-easyui-1.3.1/themes/gray/easyui.css">
<link rel="stylesheet" type="text/css" href="../common/component/jquery-easyui-1.3.1/themes/icon.css">
<script type="text/javascript" src="../common/component/jquery/jquery-1.7.1.js"></script>
<script type="text/javascript" src="../common/component/jquery-easyui-1.3.1/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../common/component/jquery-easyui-1.3.1/src/jquery.parser.js"></script>

<style type="text/css">

	body {
		margin: 0;
	}
	
	.Controlmenu {
		background-color: #EEEEEE;
		padding:5px;
		width:263px;
		text-align: center;
		margin-top: 10px;
		cursor: pointer;
	}
	
	.Controlmenu:hover {
		background-color: #CCCCCC;
		font-weight: bold;
	}

</style>
</head>
<body class="easyui-layout">
	<div data-options="region:'north',split:true" style="height:100px;padding:10px;">
		<p>The north content.</p>
	</div>
	<div data-options="region:'west',split:true" title="功能菜单树" style="width:280px;overflow:hidden;">
		<div class="easyui-accordion" data-options="fit:true,border:false">
			<div title="业务对象管理" data-options="selected:true" style="padding:0px;overflow:auto;">
				<!-- <div style="background:#C9EDCC;padding:5px;width:263px;">
					<a id="add" href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'">Add</a>
				</div> -->
				<div class="Controlmenu" onclick="showManager(this, 'bo/bo_list.jsp');">
					业务对象管理
				</div>
				<div class="Controlmenu" onclick="showManager(this, 'dict/dict_list.jsp');">
					数据字典管理
				</div>
			</div>
			<div title="数据字典管理" style="padding:10px;">
				content2
			</div>
			<div title="Title3" style="padding:10px">
				content3
			</div>
		</div>
	</div>
	<div id="rightComponent" data-options="region:'center'" style="overflow:hidden;">
		<div id="tabs" class="easyui-tabs" data-options="fit:true,border:false">
			
		</div>
	</div>
	
    <div id="win"></div>
</body>

<script type="text/javascript">

	var selectedMenu;			// 当前选中的菜单

	$(document).ready(function(){
	});
	
	function showManager(obj, url) {
		var isExists = false;
		$.each($('#tabs').tabs(), function(){
			if($('#tabs').tabs('exists',$(obj).html()))
				isExists = true;
		});
		if(!isExists) {
			$('#tabs').tabs('add',{  
	            title: $(obj).html(),  
	            href: url,
	            closable: true
	        });
			$(selectedMenu).css("background-color", "#EEEEEE");
			$(selectedMenu).css("font-weight", "normal");
			selectedMenu = obj;
			$(selectedMenu).css("background-color", "#CCCCCC");
			$(selectedMenu).css("font-weight", "bold");
		} else {
			$('#tabs').tabs('select',$(obj).html());
			$(selectedMenu).css("background-color", "#EEEEEE");
			$(selectedMenu).css("font-weight", "normal");
			selectedMenu = obj;
			$(selectedMenu).css("background-color", "#CCCCCC");
			$(selectedMenu).css("font-weight", "bold");
		}
	}

</script>
</html>